/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cse308.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Aaron
 */
@Embeddable
public class TargetattainmentlevelPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(nullable = false, length = 10)
    private String semester;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 20)
    @Column(nullable = false, length = 20)
    private String peo;

    public TargetattainmentlevelPK() {
    }

    public TargetattainmentlevelPK(String semester, String peo) {
        this.semester = semester;
        this.peo = peo;
    }

    public String getSemester() {
        return semester;
    }

    public void setSemester(String semester) {
        this.semester = semester;
    }

    public String getPeo() {
        return peo;
    }

    public void setPeo(String peo) {
        this.peo = peo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (semester != null ? semester.hashCode() : 0);
        hash += (peo != null ? peo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TargetattainmentlevelPK)) {
            return false;
        }
        TargetattainmentlevelPK other = (TargetattainmentlevelPK) object;
        if ((this.semester == null && other.semester != null) || (this.semester != null && !this.semester.equals(other.semester))) {
            return false;
        }
        if ((this.peo == null && other.peo != null) || (this.peo != null && !this.peo.equals(other.peo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cse308.entities.TargetattainmentlevelPK[ semester=" + semester + ", peo=" + peo + " ]";
    }
    
}
